<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  

  
  <title>程序员的强迫症 | 在路上</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="description" content="编程追求效率，却也讲究习惯。习惯改变之难，还真不能说那就不是个事儿，在技术圈子尤甚。 当然，JavaScript这个圈子也不例外，比如这些：  JavaScript语句后面应该加分号吗？ eval is evil? == or ===? …  上面的话题，个个是G点，分分钟引发高潮。就犹如Vim和Emacs、Windows和Linux等话题，一旦开篇随之而来的就是引经据典、长篇大论、你死我活、百态">
<meta name="keywords" content="JavaScript">
<meta property="og:type" content="article">
<meta property="og:title" content="程序员的强迫症">
<meta property="og:url" content="http://yoursite.com/2014/07/29/程序员的强迫症/index.html">
<meta property="og:site_name" content="在路上">
<meta property="og:description" content="编程追求效率，却也讲究习惯。习惯改变之难，还真不能说那就不是个事儿，在技术圈子尤甚。 当然，JavaScript这个圈子也不例外，比如这些：  JavaScript语句后面应该加分号吗？ eval is evil? == or ===? …  上面的话题，个个是G点，分分钟引发高潮。就犹如Vim和Emacs、Windows和Linux等话题，一旦开篇随之而来的就是引经据典、长篇大论、你死我活、百态">
<meta property="og:locale" content="zh-CN">
<meta property="og:updated_time" content="2018-03-26T11:35:06.707Z">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="程序员的强迫症">
<meta name="twitter:description" content="编程追求效率，却也讲究习惯。习惯改变之难，还真不能说那就不是个事儿，在技术圈子尤甚。 当然，JavaScript这个圈子也不例外，比如这些：  JavaScript语句后面应该加分号吗？ eval is evil? == or ===? …  上面的话题，个个是G点，分分钟引发高潮。就犹如Vim和Emacs、Windows和Linux等话题，一旦开篇随之而来的就是引经据典、长篇大论、你死我活、百态">
  
    <link rel="alternate" href="/atom.xml" title="在路上" type="application/atom+xml">
  
  
    <link rel="icon" href="/favicon.png">
  
  
    <link href="//fonts.googleapis.com/css?family=Source+Code+Pro" rel="stylesheet" type="text/css">
  
  <link rel="stylesheet" href="/css/style.css">
</head>

<body>
  <div id="container">
    <div id="wrap">
      <header id="header">
  <div id="banner"></div>
  <div id="header-outer" class="outer">
    <div id="header-title" class="inner">
      <h1 id="logo-wrap">
        <a href="/" id="logo">在路上</a>
      </h1>
      
        <h2 id="subtitle-wrap">
          <a href="/" id="subtitle">一位崇尚价值投资的 Web 开发者</a>
        </h2>
      
    </div>
    <div id="header-inner" class="inner">
      <nav id="main-nav">
        <a id="main-nav-toggle" class="nav-icon"></a>
        
          <a class="main-nav-link" href="/">Home</a>
        
          <a class="main-nav-link" href="/archives">Archives</a>
        
      </nav>
      <nav id="sub-nav">
        
          <a id="nav-rss-link" class="nav-icon" href="/atom.xml" title="RSS Feed"></a>
        
        <a id="nav-search-btn" class="nav-icon" title="搜索"></a>
      </nav>
      <div id="search-form-wrap">
        <form action="//google.com/search" method="get" accept-charset="UTF-8" class="search-form"><input type="search" name="q" class="search-form-input" placeholder="Search"><button type="submit" class="search-form-submit">&#xF002;</button><input type="hidden" name="sitesearch" value="http://yoursite.com"></form>
      </div>
    </div>
  </div>
</header>
      <div class="outer">
        <section id="main"><article id="post-程序员的强迫症" class="article article-type-post" itemscope itemprop="blogPost">
  <div class="article-meta">
    <a href="/2014/07/29/程序员的强迫症/" class="article-date">
  <time datetime="2014-07-28T16:00:00.000Z" itemprop="datePublished">2014-07-29</time>
</a>
    
  </div>
  <div class="article-inner">
    
    
      <header class="article-header">
        
  
    <h1 class="article-title" itemprop="name">
      程序员的强迫症
    </h1>
  

      </header>
    
    <div class="article-entry" itemprop="articleBody">
      
        <p>编程追求效率，却也讲究习惯。习惯改变之难，还真不能说<code>那就不是个事儿</code>，在技术圈子尤甚。</p>
<p>当然，JavaScript这个圈子也不例外，比如这些：</p>
<ul>
<li><a href="http://www.zhihu.com/question/20298345" target="_blank" rel="noopener">JavaScript语句后面应该加分号吗？</a></li>
<li><a href="http://www.nczonline.net/blog/2013/06/25/eval-isnt-evil-just-misunderstood/" target="_blank" rel="noopener">eval is evil?</a></li>
<li><a href="http://javascriptweblog.wordpress.com/2011/02/07/truth-equality-and-javascript/" target="_blank" rel="noopener">== or ===?</a></li>
<li>…</li>
</ul>
<p>上面的话题，个个是G点，分分钟引发高潮。就犹如<code>Vim和Emacs</code>、<code>Windows和Linux</code>等话题，一旦开篇随之而来的就是引经据典、长篇大论、你死我活、百态尽出。</p>
<p>作为有格调的程序员，我们应追求效率。而非沉浸于无谓的争论，无端的争论往往因为恪守习惯，不善变通。</p>
<p>就上面的话题进行争论，或许还有些”技术主义情怀”。但是下面的这些纯感性的<strong>习惯</strong>呢？不妨先看看：</p>
<ul>
<li>缩进用tab还是用空格，你喜欢哪一种?</li>
<li>tab等于两个还是四个空格，你喜欢哪一种？</li>
<li>对象的键值是紧凑连接，还是在冒号后加一个空格，你喜欢哪一种？</li>
<li>变量声明，单行还是多行，你又喜欢哪一种？</li>
<li>单行代码块的花括号，加还是不加？</li>
<li>…</li>
</ul>
<p>这种<strong>习惯</strong>多如牛毛，以至“知音”着实难寻，因为实在是众口难调、各有所爱。也难怪<strong>Web Storm</strong>等编辑器在Code Style上花尽心思。</p>
<p>一味地拘泥于习惯，在团队协作时就会患上<strong>强迫症</strong>。比如在别人的代码后面加个分号、补个空格，多加个空白行等等诸如此类。如果赶上心情好、情绪佳，或许会再花上一两小时，与他人舌战一番，定要分个胜负。</p>
<p>此种行为既“无伤大雅”，也非“罪恶滔天”，情不自禁而已。不然“看着心里难受”，这种难受之于程序员，比1px的像素差之于产品经理可来的猛烈多了。于是乎加分号、补空格、按换行、删注释、调整顺序，忙得不亦乐乎。待大功告成，仿佛看见了光，解救了天解救了地也解救了自己，心情倍儿爽。</p>
<p>如果你还在做这种“解救众生”的活，不妨试试JSHint来换个活法儿吧。</p>
<h2 id="什么是JSHint"><a href="#什么是JSHint" class="headerlink" title="什么是JSHint"></a>什么是JSHint</h2><p><a href="http://www.jshint.com/about/" target="_blank" rel="noopener">JSHint</a>是一个用于检查JavaScript代码错误和潜在问题的工具。通过简单的配置，它可以强制约束团队保持一致的编码风格。</p>
<h2 id="JSHint配置文件的格式"><a href="#JSHint配置文件的格式" class="headerlink" title="JSHint配置文件的格式"></a>JSHint配置文件的格式</h2><p>在项目根目录新加一个名称为<strong>.jshintrc</strong>的文件，加入相关配置即可，典型的配置如下：</p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">	<span class="string">"node"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"eqeqeq"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"forin"</span>: <span class="literal">false</span>,</span><br><span class="line">	<span class="string">"plusplus"</span>: <span class="literal">false</span>,</span><br><span class="line">	<span class="string">"undef"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"unused"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"strict"</span>: <span class="literal">false</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<p>json文件中的每一项都对应着一条规则。如果代码违反了规则，编辑器会给出错误提示。这方面Web Storm非常不错。JSHint详细配置文档，请看<a href="http://www.jshint.com/docs/options/" target="_blank" rel="noopener">这里</a></p>
<p>每个文件夹可以有单独的.jshintrc，作用范围就是其下JavaScript代码。还可以使用<strong>.jshintignore</strong>来排除将规则应用到当前目录指定的文件和文件夹。</p>
<h2 id="如何在Web-Storm中使用JSHint"><a href="#如何在Web-Storm中使用JSHint" class="headerlink" title="如何在Web Storm中使用JSHint"></a>如何在Web Storm中使用JSHint</h2><blockquote>
<ul>
<li><code>CMD + ,</code> 打开偏好设置，输入JSHint搜索习惯配置项</li>
<li>选中Inspections&gt;JavaScript&gt;Code quality tools&gt;JSHint</li>
<li>点击JavaScript&gt;Code quality tools&gt;JSHint，勾选enable和use config file(default)即可</li>
</ul>
</blockquote>
<h2 id="配置详解"><a href="#配置详解" class="headerlink" title="配置详解"></a>配置详解</h2><h3 id="强制选项-enforcing-options"><a href="#强制选项-enforcing-options" class="headerlink" title="强制选项(enforcing options)"></a>强制选项(enforcing options)</h3><p>设置为true时，应用规则，对代码约束更严格。</p>
<table>
<thead>
<tr>
<th>配置项</th>
<th>释义</th>
<th>好处</th>
</tr>
</thead>
<tbody>
<tr>
<td> bitwise</td>
<td>禁止按位操作</td>
<td>避免&amp;和&amp;&amp;手误</td>
</tr>
<tr>
<td>camelcase</td>
<td>变量名只允许驼峰camelCase和UPPER_CASE风格</td>
<td></td>
</tr>
<tr>
<td>curly</td>
<td>单行代码块必须使用分号</td>
<td>防止潜在bug</td>
</tr>
<tr>
<td>eqeqeq</td>
<td>禁止使用==,!=</td>
<td>避免类型转换</td>
</tr>
<tr>
<td>es3</td>
<td>兼容IE 6/7/8/9</td>
<td></td>
</tr>
<tr>
<td>forin</td>
<td>内部必须使用hasOwnProperty</td>
<td>防止遍历原型链上的其它属性</td>
</tr>
<tr>
<td>freeze</td>
<td>禁止覆写原生对象</td>
<td></td>
</tr>
<tr>
<td>immend</td>
<td>(function(){}())</td>
<td></td>
</tr>
<tr>
<td>indent</td>
<td>2/4</td>
<td></td>
</tr>
<tr>
<td>latedef</td>
<td>禁止未定义而使用</td>
<td>防止潜在bug</td>
</tr>
<tr>
<td>newcap</td>
<td>类名首字母大写</td>
<td></td>
</tr>
<tr>
<td>noarg</td>
<td>禁止使用arguments.caller和arguments.callee</td>
<td>难以优化，且已经被废除</td>
</tr>
<tr>
<td>noempty</td>
<td>禁止出现空代码块</td>
<td></td>
</tr>
<tr>
<td>nonew</td>
<td>禁止调用构造函数而不赋值</td>
<td></td>
</tr>
<tr>
<td>plusplus</td>
<td>禁止使用++, –</td>
<td>不同语言含义不一致</td>
</tr>
<tr>
<td>quotmark</td>
<td>true/single/double</td>
<td></td>
</tr>
<tr>
<td>undef</td>
<td>禁止使用未定义的遍历</td>
<td></td>
</tr>
<tr>
<td>unused</td>
<td>禁止出现未使用的变量</td>
<td>设置为vars不检查函数参数</td>
</tr>
<tr>
<td>strict</td>
<td>所有的<strong>函数</strong>都会使用es5的严格模式</td>
<td></td>
</tr>
<tr>
<td>maxparams</td>
<td>最多的形参</td>
<td>5</td>
</tr>
<tr>
<td>maxdepth</td>
<td>嵌套深度</td>
<td></td>
</tr>
<tr>
<td>maxstatements</td>
<td>最多声明</td>
<td></td>
</tr>
<tr>
<td>maxcomplexity</td>
<td>cyclomatic complexity</td>
<td></td>
</tr>
<tr>
<td>maxlen</td>
<td>设置一行最大的长度</td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="宽松选项-relaxing-options"><a href="#宽松选项-relaxing-options" class="headerlink" title="宽松选项(relaxing options)"></a>宽松选项(relaxing options)</h3><p>设置为true时，应用规则，对代码约束更宽松。</p>
<table>
<thead>
<tr>
<th>配置项</th>
<th>解释</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>asi</td>
<td>忽略句尾分号警告</td>
<td>扩展阅读：<a href="http://blog.izs.me/post/2353458699/an-open-letter-to-javascript-leaders-regarding" target="_blank" rel="noopener">1</a> , <a href="http://inimino.org/~inimino/blog/javascript_semicolons" target="_blank" rel="noopener">2</a></td>
</tr>
<tr>
<td>boss</td>
<td>会允许在if，for，while里面编写赋值语句</td>
<td>不检查判断条件中得赋值</td>
</tr>
<tr>
<td>debug</td>
<td>忽略debug语句</td>
<td></td>
</tr>
<tr>
<td>eqnull</td>
<td>允许 == null</td>
<td></td>
</tr>
<tr>
<td>esnext</td>
<td>允许ES6语法</td>
<td><a href="http://wiki.ecmascript.org/doku.php?id=harmony:specification_drafts" target="_blank" rel="noopener">ES6草案</a></td>
</tr>
<tr>
<td>evil</td>
<td>忽略evil警告</td>
<td></td>
</tr>
<tr>
<td>expr</td>
<td>在赋值或者函数调用的地方允许出现表达式</td>
<td>大部分情况是手误</td>
</tr>
<tr>
<td>funcscope</td>
<td>允许在控制流程if等中定义变量</td>
<td>默认为false</td>
</tr>
<tr>
<td>globalstrict</td>
<td>忽略全局使用strict的警告</td>
<td></td>
</tr>
<tr>
<td>iterator</td>
<td>忽略使用<strong>iterator</strong>属性警告</td>
<td>并非所有浏览器支持</td>
</tr>
<tr>
<td>lastsemic</td>
<td>仅允许单行代码块不使用分号</td>
<td></td>
</tr>
<tr>
<td>laxbreak</td>
<td>忽略不安全的换行告警</td>
<td></td>
</tr>
<tr>
<td>laxcomma</td>
<td>忽略逗号风格告警</td>
<td></td>
</tr>
<tr>
<td>loopfunc</td>
<td>忽略在循环中定义函数告警</td>
<td>建议设置为false</td>
</tr>
<tr>
<td>maxerr</td>
<td>设置JSHint最多警告数目</td>
<td>默认50</td>
</tr>
<tr>
<td>moz</td>
<td>表明这是Mozilla扩展</td>
<td><a href="https://developer.mozilla.org/en-US/docs/JavaScript/New_in_JavaScript/1.7" target="_blank" rel="noopener">New in JavaScript 1.7</a></td>
</tr>
<tr>
<td>multistr</td>
<td>忽略多行字符串告警</td>
<td></td>
</tr>
<tr>
<td>notypeof</td>
<td>忽略不正确的typeof比较</td>
<td>默认为false，不用管</td>
</tr>
<tr>
<td>proto</td>
<td>忽略使用<strong>proto</strong> 属性</td>
<td></td>
</tr>
<tr>
<td>scripturl</td>
<td>忽略使用”javascript:…”告警</td>
<td></td>
</tr>
<tr>
<td>shadow</td>
<td>忽略重复声明变量产生的告警</td>
<td></td>
</tr>
<tr>
<td>sub</td>
<td>忽略使用[]而不是.访问属性的告警</td>
<td></td>
</tr>
<tr>
<td>supernew</td>
<td>忽略使用诡异的构造函数告警</td>
<td><a href="http://www.jshint.com/docs/options/#supernew" target="_blank" rel="noopener">示例</a></td>
</tr>
<tr>
<td>validthis</td>
<td>忽略严格模式在非构造函数中使用this</td>
<td>函数内部使用</td>
</tr>
<tr>
<td>noyield</td>
<td>允许没有使用yield的generator function</td>
<td></td>
</tr>
</tbody>
</table>
<h3 id="环境配置-Environments"><a href="#环境配置-Environments" class="headerlink" title="环境配置(Environments)"></a>环境配置(Environments)</h3><table>
<thead>
<tr>
<th>配置项</th>
<th>说明</th>
</tr>
</thead>
<tbody>
<tr>
<td>browser</td>
<td>可以使用HTML5的新特性如FileReader等</td>
</tr>
<tr>
<td>couch</td>
<td>CouchDB</td>
</tr>
<tr>
<td>devel</td>
<td>可以使用穷人版的debug工具，比如console、alert</td>
</tr>
<tr>
<td>dojo</td>
<td>Dojo Toolkit</td>
</tr>
<tr>
<td>jquery</td>
<td>jquery</td>
</tr>
<tr>
<td>node</td>
<td>Node.js</td>
</tr>
<tr>
<td>nonstandard</td>
<td>允许流行而不标准的全局变量，比如escape和unescape</td>
</tr>
<tr>
<td>phantom</td>
<td><a href="http://phantomjs.org/" target="_blank" rel="noopener">PhantomJS</a></td>
</tr>
<tr>
<td> protypejs</td>
<td>protypejs</td>
</tr>
<tr>
<td>rhino</td>
<td><a href="http://www.mozilla.org/rhino/" target="_blank" rel="noopener">Rhino</a></td>
</tr>
<tr>
<td>worker</td>
<td>表明你的脚本运行在<a href="https://developer.mozilla.org/en/Using_web_workers" target="_blank" rel="noopener">Web Worker</a>中</td>
</tr>
<tr>
<td>wsh</td>
<td><a href="http://en.wikipedia.org/wiki/Windows_Script_Host" target="_blank" rel="noopener">Windows_Script_Host</a></td>
</tr>
<tr>
<td>yui</td>
<td><a href="http://yuilibrary.com/" target="_blank" rel="noopener">YUI</a></td>
</tr>
</tbody>
</table>
<h2 id="币须网的JSHint"><a href="#币须网的JSHint" class="headerlink" title="币须网的JSHint"></a>币须网的JSHint</h2><p><a href="http://www.coinxu.com" target="_blank" rel="noopener">币须网</a>作为国内第一家应用<strong>比特币多重签名</strong>技术的电子商务平台，后台全部使用Node.js搭建，在团队协作上也需要JSHint这样的工具来进行检查和约束。我们正在使用如下的配置：</p>
<figure class="highlight javascript"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br><span class="line">17</span><br><span class="line">18</span><br><span class="line">19</span><br><span class="line">20</span><br><span class="line">21</span><br><span class="line">22</span><br><span class="line">23</span><br><span class="line">24</span><br><span class="line">25</span><br><span class="line">26</span><br><span class="line">27</span><br><span class="line">28</span><br><span class="line">29</span><br><span class="line">30</span><br><span class="line">31</span><br><span class="line">32</span><br><span class="line">33</span><br><span class="line">34</span><br><span class="line">35</span><br><span class="line">36</span><br><span class="line">37</span><br><span class="line">38</span><br><span class="line">39</span><br><span class="line">40</span><br><span class="line">41</span><br><span class="line">42</span><br><span class="line">43</span><br><span class="line">44</span><br><span class="line">45</span><br><span class="line">46</span><br><span class="line">47</span><br><span class="line">48</span><br><span class="line">49</span><br><span class="line">50</span><br><span class="line">51</span><br></pre></td><td class="code"><pre><span class="line">&#123;</span><br><span class="line">	<span class="string">"bitwise"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"camelcase"</span>: <span class="literal">false</span>,</span><br><span class="line">	<span class="string">"curly"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"eqeqeq"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"es3"</span>: <span class="literal">false</span>,</span><br><span class="line">	<span class="string">"forin"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"freeze"</span>: <span class="literal">false</span>,</span><br><span class="line">	<span class="string">"immed"</span>: <span class="literal">false</span>,</span><br><span class="line">	<span class="string">"indent"</span>: <span class="number">2</span>,</span><br><span class="line">	<span class="string">"latedef"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"newcap"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"noarg"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"noempty"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"nonbsp"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"nonew"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"plusplus"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"quotmark"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"undef"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"unused"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"strict"</span>: <span class="literal">false</span>,</span><br><span class="line">	<span class="string">"maxparams"</span>: <span class="number">5</span>,</span><br><span class="line">	<span class="string">"maxdepth"</span>: <span class="number">8</span>,</span><br><span class="line">	<span class="string">"maxstatements"</span>: <span class="number">50</span>,</span><br><span class="line">	<span class="string">"maxcomplexity"</span>:<span class="literal">false</span>,</span><br><span class="line"></span><br><span class="line">	<span class="string">"asi"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"boss"</span>: <span class="literal">false</span>,</span><br><span class="line">	<span class="string">"debug"</span>: <span class="literal">false</span>,</span><br><span class="line">	<span class="string">"eqnull"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"esnext"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"evil"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"expr"</span>: <span class="literal">false</span>,</span><br><span class="line">	<span class="string">"funcscope"</span>: <span class="literal">false</span>,</span><br><span class="line">	<span class="string">"globalstrict"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"iterator"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"lastsemic"</span>: <span class="literal">true</span>,</span><br><span class="line">	<span class="string">"laxbreak"</span>: <span class="literal">false</span>,</span><br><span class="line">	<span class="string">"laxcomma"</span>: <span class="literal">false</span>,</span><br><span class="line">	<span class="string">"loopfunc"</span>: <span class="literal">false</span>,</span><br><span class="line">	<span class="string">"maxerr"</span>: <span class="number">50</span>,</span><br><span class="line">	<span class="string">"multistr"</span>: <span class="literal">false</span>,</span><br><span class="line">	<span class="string">"notypeof"</span>: <span class="literal">false</span>,</span><br><span class="line">	<span class="string">"proto"</span>:<span class="literal">true</span>,</span><br><span class="line">	<span class="string">"shadow"</span>: <span class="literal">false</span>,</span><br><span class="line">	<span class="string">"supernew"</span>: <span class="literal">false</span>,</span><br><span class="line">	<span class="string">"validthis"</span>: <span class="literal">false</span>,</span><br><span class="line">	<span class="string">"noyield"</span>: <span class="literal">false</span>,</span><br><span class="line"></span><br><span class="line">	<span class="string">"node"</span>: <span class="literal">true</span></span><br><span class="line">&#125;</span><br></pre></td></tr></table></figure>
<h2 id="结语"><a href="#结语" class="headerlink" title="结语"></a>结语</h2><p><strong>强迫症</strong>每个人或多或少都有一点，沉溺于习惯求稳而不求变也是人之本性。但如果要突破自我，不求变通怕是成不了气候。再则善于运用标准化的工具也算得上一大进步，程序员尤其如此，如果偶然之间随手解救了团队和自己也算得上造福一方吧。</p>

      
    </div>
    <footer class="article-footer">
      <a data-url="http://yoursite.com/2014/07/29/程序员的强迫症/" data-id="cjf865ug4001q8wp1ow9ef2r4" class="article-share-link">Share</a>
      
      
  <ul class="article-tag-list"><li class="article-tag-list-item"><a class="article-tag-list-link" href="/tags/JavaScript/">JavaScript</a></li></ul>

    </footer>
  </div>
  
    
<nav id="article-nav">
  
    <a href="/2015/04/02/isArguments/" id="article-nav-newer" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Newer</strong>
      <div class="article-nav-title">
        
          美妙的函数之isArguments
        
      </div>
    </a>
  
  
    <a href="/2014/07/15/初识JavaScript Promises之二/" id="article-nav-older" class="article-nav-link-wrap">
      <strong class="article-nav-caption">Older</strong>
      <div class="article-nav-title">初识JavaScript Promises之二</div>
    </a>
  
</nav>

  
</article>

</section>
        
          <aside id="sidebar">
  
    

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">标签</h3>
    <div class="widget">
      <ul class="tag-list"><li class="tag-list-item"><a class="tag-list-link" href="/tags/JavaScript/">JavaScript</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/JavaScript-解析器/">JavaScript,解析器</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/React/">React</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Redux/">Redux</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/SlimerJS/">SlimerJS</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/代码管理/">代码管理</a></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/持续集成/">持续集成</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">标签云</h3>
    <div class="widget tagcloud">
      <a href="/tags/JavaScript/" style="font-size: 20px;">JavaScript</a> <a href="/tags/JavaScript-解析器/" style="font-size: 10px;">JavaScript,解析器</a> <a href="/tags/React/" style="font-size: 16.67px;">React</a> <a href="/tags/Redux/" style="font-size: 10px;">Redux</a> <a href="/tags/SlimerJS/" style="font-size: 10px;">SlimerJS</a> <a href="/tags/代码管理/" style="font-size: 10px;">代码管理</a> <a href="/tags/持续集成/" style="font-size: 13.33px;">持续集成</a>
    </div>
  </div>

  
    
  <div class="widget-wrap">
    <h3 class="widget-title">归档</h3>
    <div class="widget">
      <ul class="archive-list"><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/09/">九月 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/07/">七月 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/06/">六月 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/03/">三月 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2016/02/">二月 2016</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/12/">十二月 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/06/">六月 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/05/">五月 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2015/04/">四月 2015</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/07/">七月 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2014/06/">六月 2014</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2012/11/">十一月 2012</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2012/10/">十月 2012</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2012/07/">七月 2012</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2012/03/">三月 2012</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2012/02/">二月 2012</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2011/10/">十月 2011</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/2010/01/">一月 2010</a></li><li class="archive-list-item"><a class="archive-list-link" href="/archives/1970/01/">一月 1970</a></li></ul>
    </div>
  </div>


  
    
  <div class="widget-wrap">
    <h3 class="widget-title">最新文章</h3>
    <div class="widget">
      <ul>
        
          <li>
            <a href="/2016/09/09/space/">空格</a>
          </li>
        
          <li>
            <a href="/2016/07/17/parser/">JavaScript Parser资源总结</a>
          </li>
        
          <li>
            <a href="/2016/06/29/slimerjs/">使用SlimerJS将网页输出为PDF</a>
          </li>
        
          <li>
            <a href="/2016/06/26/code-management/">代码管理</a>
          </li>
        
          <li>
            <a href="/2016/06/18/violet/">violet - 值得一试的写作同步小助手</a>
          </li>
        
      </ul>
    </div>
  </div>

  
</aside>
        
      </div>
      <footer id="footer">
  
  <div class="outer">
    <div id="footer-info" class="inner">
      &copy; 2018 Simon Xu<br>
      Powered by <a href="http://hexo.io/" target="_blank">Hexo</a>
    </div>
  </div>
</footer>
    </div>
    <nav id="mobile-nav">
  
    <a href="/" class="mobile-nav-link">Home</a>
  
    <a href="/archives" class="mobile-nav-link">Archives</a>
  
</nav>
    

<script src="//ajax.googleapis.com/ajax/libs/jquery/2.0.3/jquery.min.js"></script>


  <link rel="stylesheet" href="/fancybox/jquery.fancybox.css">
  <script src="/fancybox/jquery.fancybox.pack.js"></script>


<script src="/js/script.js"></script>



  </div>
</body>
</html>